//
// ServerAdmin.h
//

#ifndef __H_CClientAdmin__
#define __H_CClientAdmin__

#include "CRoleAdmin.h"
#include "CTCPListener.h"

class ServerAdmin : public CRoleAdmin
{
public:
	ServerAdmin();
	virtual ~ServerAdmin();

	virtual BOOL Initialize(void);
	virtual void Finalize(void);

public:
	virtual BOOL Call(DWORD ip, WORD port);
	virtual void EndCall(BOOL inNotifyPeer /* = TRUE */);

protected:
	virtual BOOL OnRecvUdpCmd(AgentSession *pSession, const UdpPack *pPack);
	virtual BOOL OnTcpAccept();

protected:
	virtual SOCKET GetVideoStreamSocket(void);
	virtual SOCKET GetAudioStreamSocket(void);

private:
	CTCPListener	mTcpListener;

	enum Status
	{
		STATUS_NONE = 0,
		STATUS_STANDBY,
		STATUS_CALLING,
		STATUS_ENJOYING,
		STATUS_MAX,
	};
	Status mStatus;
};

#endif // __H_CClientAdmin__